#pragma once
#include "ServiceHandler.h"
#include "INET_Addr.h"
#include "SOCK_Connector.h"
#include "IReactor.h"

#define STOPWATCH

#ifdef STOPWATCH
#include "Stopwatch.h"
#endif

class PatientValueEventClient :
	public ServiceHandler<SOCKET>
{
public:
	PatientValueEventClient(IReactor<SOCKET> *reactor);
	~PatientValueEventClient(void);

	bool open(SOCK_Stream* st);
	void handle_event(Handler<SOCKET> handle, Event_Type et);
private:
	void newRequest();
	void closeConnection();
	void newCprRequest();
	void handleReceivedInfo();
	static const int len = 10;
	char cprNr[len];

#ifdef STOPWATCH
	Stopwatch stopwatch;
#endif
};

